<template>
    <!-- 修改资料 -->

    <div>
        <el-form label-width="100px" :model="form" label-position="right" ref="formRef" :rules="formRules" disabled
            class="borderNone">
            <el-row>
                <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
                    <el-form-item label="模块名称" prop="name">
                        <el-input v-model="form.name"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
                    <el-form-item label="操作员" prop="operName">
                        <el-input v-model="form.operName"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
                    <el-form-item label="访问的URL" prop="operUrl">
                        <el-input v-model="form.operUrl"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
                    <el-form-item label="状态码" prop="status">
                        <el-input v-model="form.status"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-form-item label="简单消息" prop="simpleErrorMsg">
                    <el-input v-model="form.simpleErrorMsg" type="textarea"
                        :autosize="{ minRows: 2, maxRows: 4 }"></el-input>
                </el-form-item>
            </el-row>
            <el-row>
                <el-form-item label="出错详细消息" prop="errorMsg">
                    <el-input v-model="form.errorMsg" type="textarea" :autosize="{ minRows: 2, maxRows: 4 }"></el-input>
                </el-form-item>
            </el-row>
            <el-row>
                <el-form-item label="操作参数" prop="operParam">
                    <el-input v-model="form.operParam" type="textarea" :autosize="{ minRows: 2, maxRows: 4 }"></el-input>
                </el-form-item>
            </el-row>
            <el-row>
                <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
                    <el-form-item label="操作所花时间" prop="milliseconds">
                        <el-input v-model="form.milliseconds"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
                    <el-form-item label="服务类方法" prop="method">
                        <el-input v-model="form.method"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
                    <el-form-item label="IP地址" prop="operIp">
                        <el-input v-model="form.operIp"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
                    <el-form-item label="服务组件名" prop="appServiceName">
                        <el-input v-model="form.appServiceName"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
                    <el-form-item label="操作起始时间" prop="startDateTime">
                        <el-input v-model="form.startDateTime"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
                    <el-form-item label="操作结束时间" prop="createDateTime">
                        <el-input v-model="form.createDateTime"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
        <div class="button-position">
            <el-button @click="updateVisible" type="primary">退 出</el-button>
        </div>
    </div>
</template>


<script setup>
import { ref, onMounted } from 'vue';
import { Check, Close } from '@element-plus/icons-vue';
import Api from '@/api/model/system'
const emit = defineEmits(['updatetable'])
const props = defineProps({
    paramsData: {
        type: Object,
        defalut: {}
    }
})



onMounted(() => {
    getData();
})
// 查看用户数据的对象
const form = ref({});

const updateVisible = (val) => {
    emit('updatetable')
}

//调取数据
const getData = async () => {
    let res = await Api.log.detail.post(props.paramsData);
    console.log(res);
    if (res.code == 200) {
        form.value = res.data;
    } else {
        form.value = '';
    }

}


</script>

<style lang="less" scoped>
.borderNone {
    :deep(.el-input__wrapper) {
        box-shadow: 0 0 0 0px var(--el-input-border-color, var(--el-border-color)) inset;
        cursor: default;
        background-color: transparent; //背景颜色透明
        border-bottom: 1px solid #999;
        border-radius: 0;

        .el-input__inner {
            cursor: default !important;
        }
    }

    :deep(.el-textarea__inner) {
        box-shadow: 0 0 0 0px var(--el-input-border-color, var(--el-border-color)) inset;
        cursor: default;
        background-color: transparent; //背景颜色透明
        border-bottom: 1px solid #999;
        border-radius: 0;
        width: 400%;
    }
}</style>

